import { casePlugin } from '@/plugins/casePlugin' // 病例模块
import specialTale from '@/plugins/specialTale' // 特殊表格

// 全局的基础配置
export const initConfig = {
  api_key: 'no-api-key',
  // 宽度
  // width: 760,
  // 最大宽度
  // max_width: 1200,
  // 高度
  // height: 1000,
  // 最大高度
  // max_height: 1200,
  // 不支持的插件linkchecker  mentions tinycomments pageembed permanentpen formatpainter a11ychecker tinymcespellchecker checklist mediaembed advcode tinydrive  casechange powerpaste
  // 其他所有的插件
  plugins: 'print preview fullpage importcss searchreplace autolink autosave save directionality  visualblocks visualchars fullscreen image link media  template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists  wordcount imagetools textpattern noneditable help  charmap quickbars emoticons',
  // 工具栏
  toolbar: 'input radio checkbox select timeinput region | specialTale undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist  | forecolor backcolor   removeformat | pagebreak | charmap emoticons | fullscreen  preview save print | insertfile image media  template link anchor codesample | a11ycheck ltr rtl | showcomments addcomment',
  // 工具栏过多超过后的样式
  toolbar_drawer: 'sliding',
  // 菜单
  menu: {
    file: { title: 'File', items: 'newdocument restoredraft | preview | print' },
    edit: { title: 'Edit', items: 'undo redo | cut copy paste | selectall | searchreplace' },
    view: { title: 'View', items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen' },
    insert: { title: 'Insert', items: 'image link media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime' },
    format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat' },
    tools: { title: 'Tools', items: 'spellchecker spellcheckerlanguage | code wordcount' },
    table: { title: 'Table', items: 'inserttable tableprops deletetable row column cell' },
    help: { title: 'Help', items: 'help' }
  },
  // 菜单的顺序
  menubar: 'file edit view insert format tools table  help',

  // 扩展的按钮，插件等
  setup: (editor) => {
    casePlugin(editor)
    specialTale(editor)
  }
}
